﻿Imports System.Data.SqlClient
Public Class DF99
    Inherits Conexion
    Dim cmd As New SqlCommand
    Public Function guardar(ByVal dts As Entidades.EF99) As Boolean
        Try
            conectado()
            cmd = New SqlCommand("sp_guardar_F99")
            cmd.CommandType = CommandType.StoredProcedure
            cmd.Connection = cnn
            cmd.Parameters.AddWithValue("@numform", dts.numformu)
            cmd.Parameters.AddWithValue("@tiposolicitud", dts.tiposolicitudd)
            cmd.Parameters.AddWithValue("@control", dts.controll)
            cmd.Parameters.AddWithValue("@apellido", dts.apellidoo)
            cmd.Parameters.AddWithValue("@nombre", dts.nombree)
            cmd.Parameters.AddWithValue("@tiponumdoc", dts.tiponumdocc)
            cmd.Parameters.AddWithValue("@observaciones", dts.observacioness)
            cmd.Parameters.AddWithValue("@lugar", dts.lugarr)

            If cmd.ExecuteNonQuery Then
                Return True
            Else
                Return False
            End If

        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
        desconectado()
    End Function
    Public Function modificar(ByVal dts As Entidades.EF99) As Boolean
        Try
            conectado()
            cmd = New SqlCommand("sp_editar_F99")
            cmd.CommandType = CommandType.StoredProcedure
            cmd.Connection = cnn
            cmd.Parameters.AddWithValue("@numform", dts.numformu)
            cmd.Parameters.AddWithValue("@tiposolicitud", dts.tiposolicitudd)
            cmd.Parameters.AddWithValue("@control", dts.controll)
            cmd.Parameters.AddWithValue("@apellido", dts.apellidoo)
            cmd.Parameters.AddWithValue("@nombre", dts.nombree)
            cmd.Parameters.AddWithValue("@tiponumdoc", dts.tiponumdocc)
            cmd.Parameters.AddWithValue("@observaciones", dts.observacioness)
            cmd.Parameters.AddWithValue("@lugar", dts.lugarr)
            If cmd.ExecuteNonQuery Then
                Return True
            Else
                Return False
            End If

        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
        desconectado()
    End Function
End Class
